
import java.io.PrintWriter;
import java.util.HashMap;

class DotExpr extends Node {
	private String name_;
	private String attr_;

	public DotExpr(String n, String a) {
		name_ = n;
		attr_ = a;
	}

	@Override
	public void print(PrintWriter pw) {
		pw.println("Node name : DotExpr");
		pw.println("Dot Expression : " + name_ + "." + attr_);
	}
	public String translate(HashMap<String, PrintWriter> pws, String strPare, SymbolTable rt, String parent){
		String key = rt.getStack().get(1);
		PrintWriter pw = pws.get(key);
		
		pw.print(name_);
		pw.print(".");
		pw.print(attr_);
		return null;
	}
}
